package com.mall.service;

import com.alibaba.fastjson.JSONObject;
import com.mall.entity.TableData;
import com.mall.entity.UpdateAddress;
import com.mall.vo.SettlementVo;
import com.mall.vo.SubmitOrderVo;

import java.util.List;


public interface OrderService {

    //购物车结算
    JSONObject settlement(SettlementVo settlementVo);

    //下单操作
    JSONObject submitOrder(SubmitOrderVo submitOrderVo);

    //查询当前登录用户的订单
    JSONObject queryOrderList(Integer userId);

    //修改订单的收货信息
    void updateAddress(String orderId,UpdateAddress updateAddress);

    //修改订单的状态
    void updateStatus(String orderId, int status);

    //管理员根据订单编号查询全部订单
    List<TableData> queryAllOrder(String orderId, Integer currentPage,Integer pageSize);

    //查询订单总条数
    Long queryCount(String orderId);

    //管理员根据订单编号删除订单
    void deleteOrder(String orderId);


    //管理员根据订单编号查询订单
    TableData queryOrder(String orderId);

    //管理员根据订单编号修改订单
    void updateOrder(String orderId, Integer status, String createTime);

    //根据订单编号查询用户id
    Integer queryUserId(String orderId);
}
